package collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ArrayToListDemo {
    public static void main(String[] args) {
        String[] array={"1","2","3","4","5"};
        System.out.println("Array"+ Arrays.toString(array));
        List<String> list= Arrays.asList(array);
        System.out.println("list"+list);

        /*list.add(0,"0");
        System.out.println(list);
        System.out.println(Arrays.toString(array));*/
        List<String> list1=new ArrayList<>(list);
        list1.add("0");
        System.out.println(list1);
    }
}
